﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Entidades.Responses;
using Entidades;

namespace Agente.App_Code
{
    public class RequestHandler : Agente.App_Code.IRequestHandler
    {
        public MemoryResponse ObtenerMemoria()
        {
            SystemInfo sys = SystemInfo.GetInstance();
            MemoryResponse resp =  sys.ObtenerRam();
            if (resp == null)
                AgenteService.log.Info("La consulta de Memoria retorno null");            
            return resp;
        }

        public DiscoResponse ObtenerDisco()
        {
            SystemInfo sys = SystemInfo.GetInstance();
            DiscoResponse resp =  sys.ObtenerDisco();
            if (resp == null)
                AgenteService.log.Info("La consulta de disco retorno null");            
            return resp;
        }

        public CpuResponse ObtenerCpu()
        {
            SystemInfo sys = SystemInfo.GetInstance();
            CpuResponse resp =sys.ObtenerCPU();
            if (resp == null)
                AgenteService.log.Info("La consulta de CPU retorno null");            
            return resp;
        }
    }
}
